<?php $this->section->begin('breadcrumb')?>
<div id="global-breadcrumb">
	<ul>
		<li class="current">Thông tin liên hệ</li>
	</ul>
</div>
<?php $this->section->end()?>
<?php $this->content->begin();
?>
<div class="widget-shell inner-shadow">
	<div class="widget-header">
		<h2>Danh sách thông tin liên hệ từ khách hàng</h2>
	</div>
	<div class="widget-body">
		<table class="data-table">
			<thead>
				<tr>
					<th>Họ tên</th>
					<th>Địa chỉ email</th>
					<th>Tiêu đề</th>
					<th>Trạng thái</th>
					<th>Lựa chọn</th>
				</tr>
			</thead>
			<tbody>
				<?php foreach ($arrContact as $contact):?>
				<tr>
					<td><a><?php echo $contact->full_name?></a></td>
					<td><a><?php echo $contact->email?></a></td>
					<td><a title="<?php echo $contact->content?>"><?php echo $contact->title?></a></td>
					<td><a onclick="ChangeStatus(this);" rel="<?php echo $contact->id?>"><?php echo $contact->status?></a></td>
					<td><?php echo $contact->action?></td>
				</tr>
				<?php endforeach;?>
			</tbody>
		</table>
		<div class="fclear"></div>
	</div>
</div>
<div id="deleteDialog" style="display: none"></div>
<script>
function ChangeStatus(obj)
{
	$.ajax({
		url: "<?php echo $this->url->action('changeStatus')?>",
		data: {id: $(obj).attr('rel')},
		dataType: 'json',
		type: 'POST',
		success: function(response)
		{
			$(obj).html(response.text);
		}
	});
}
</script>
<?php $this->content->end()?>
<?php $this->section->begin("scripts")?>
<?php $this->html->loadJs('Areas/Contacts/Assets/js/delete.js');?>
<?php $this->section->end()?>